{extend name="admin/public/base"/}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__static__/common/css/bootstrap-editable.css">
{/block}
{block name="body"}
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">{$meta_title}</h3>
		<div class="box-tools pull-right">
			<a class="btn btn-sm btn-info" href="{:url('/admin/addons/index', ['refresh'=>1])}">更 新</a>
		</div>
	</div>
	<div class="box-body">
		<div class="table-responsive clearfix">
			<table class="table table-hover">
				<thead>
					<tr>
						<th><input class="checkbox check-all" type="checkbox"></th>
						<th>ID</th>
						<th>名称</th>
						<th>标识</th>
						<th>描述</th>
						<th>状态</th>
						<th>作者</th>
						<th>版本</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="list" id="item"}
					<tr>
						<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
						<td>{$item['id']|default=0}</td>
						<td>{$item['title']}</td>
						<td>{$item['name']}</td>
						<td>{$item['description']}</td>
						<td>{$item['status_text']}</td>
						<td>{$item['author']}</td>
						<td>{$item['version']}</td>
						<td>
							{if !$item['isinstall']}
							<a href="{:url('/admin/addons/install', ['addon_name' => $item['name']])}" class="ajax-get">安装</a>
							{else/}
							<a href="{:url('/admin/addons/uninstall', ['id'=>$item['id']])}" class="confirm ajax-get">卸载</a>
							{if $item['status']}
							<a href="{:url('/admin/addons/disable', ['id'=>$item['id']])}" class="confirm ajax-get">禁用</a>
							{else/}
							<a href="{:url('/admin/addons/enable', ['id'=>$item['id']])}" class="confirm ajax-get">启用</a>
							{/if}
							<a href="{:url('/admin/addons/config', ['id'=>$item['id']])}">设置</a>
							{/if}
						</td>
					</tr>
					{/volist}
				</tbody>
			</table>
			{$page|raw}
		</div>
	</div>
</div>
{/block}
{block name="script"}
{/block}